package com.hulk.dryad.persistence.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 实体父类
 *
 * @author hulk
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SuperEntity<T extends Model<?>> extends Model<T> {


    /*
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    @TableField(value = "updated_time", fill = FieldFill.INSERT )
    private LocalDateTime createdTime;

    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE, update = "NOW()")
    private LocalDateTime updatedTime;
	@TableField(value = "reversion", fill = FieldFill.INSERT_UPDATE)
	*/


    @Version
	@TableField(value = "reversion", fill = FieldFill.INSERT)
    private Long reversion ;


    public static final String REVERSION = "reversion";
    public static final String CREATED_TIME = "created_time";
    public static final String UPDATED_TIME = "updated_time";


}
